package com.kingbull.webservice.shunt;

import com.kingbull.web.communic.Body;
import com.kingbull.web.communic.Head;
import com.kingbull.web.communic.Subject;
import com.kingbull.web.mapper.extend.IDCardOrderDao;
import net.sf.json.JSONObject;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

//身份证取订单 1005
@Service
public class IDCardOrder{
    @Autowired
    private IDCardOrderDao dao;

    public String run(Subject sub){
        Head head= sub.getHead();
        Body body= sub.getBody();
        List<Map<String, Object>> param = dao.getOrder(body.getIdCardNo(),head.getFirmID());
        sub.getBody().setParams(param);
        JSONObject object = JSONObject.fromObject(sub);
        String jsonstr = object.toString();
        return jsonstr;
    }
}
